class SignRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;

	SignRenderer(ITexture *texture) :
		Texture(texture)
	{
	}

	int GetTypeData(const int &data) { return data; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		const float scale = 16.0f / 24.0f;
		renderer->Translate(8, 8, 8);
		renderer->Scale(scale, scale, scale);

		Box box(Texture, Point3i(24, 12, 2));
		box.Unwrap(Point2i(2, 2));

		if (block.ID == 68)
		{
			box.Position = Point3i(-12, -6, -12);
			switch (block.Data)
			{
			case 0x02:
				renderer->Rotate(180, 0, 1, 0);
				break;
			case 0x04:
				renderer->Rotate(-90, 0, 1, 0);
				break;
			case 0x05:
				renderer->Rotate(90, 0, 1, 0);
				break;
			}
		}
		else
		{
			box.Position = Point3i(-12, -14, -1);
			//renderer->Rotate(-90, 0, 1, 0);

			int rot = -((block.Data * (1 / 16.0f)) * 360);
			renderer->Rotate(rot, 0, 1, 0);

			renderer->Draw(Box(Texture, Point3i(2, 14, 2), Point3i(-1, -2, -1)).Unwrap(Point2i(2, 16)));
		}

		renderer->Draw(box);
		renderer->Translate(-8, -8, -8);
	}
};